import {
  Entity,
  Column,
  PrimaryGeneratedColumn,
  JoinColumn,
  OneToOne,
} from 'typeorm';
import { User } from './User';
@Entity({
  name: 'user_detail', // 这里表示自定义表名称
})
export class UserDetail {
  @PrimaryGeneratedColumn()
  id: number;

  @Column()
  phone: string;

  @Column()
  address: string;

  @Column()
  email: string;

  @JoinColumn()
  @OneToOne(() => User)
  user: User;
}
